home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1353.dms / var1353.adf / TEXTPLUS / TPP501.lha / TPP / Install / Install_TPP < prev    next >
Text File  |  1994-01-08  |  14KB  |  579 lines

  1. ;
  2. ; Install script for TeXt Plus Professional
  3. ;
  4. ; $VER: Installation TPP V5.00 (07.01.94)
  5. ;
  6.  
  7. (set @default-dest "")
  8.  
  9. ;=============================================================================
  10. ; English strings
  11.  
  12. (set default_lang 1)
  13.  
  14. (set #bad-kick "TPP only runs under OS 2.04 or higher!\n")
  15.  
  16. (set #install-msg
  17.     (cat "\n\nTeXt Plus Professional installation script.\n"
  18.          "This script installs TPP on your Amiga.\n\n"
  19.          "Read the documentation for\n"
  20.          "further information on TPP.\n\n"
  21.          "TeXt Plus Professional © 1988-1994 Martin Steppler\n"
  22.          "All rights reserved."
  23.     )
  24. )
  25.  
  26. (set #update-msg
  27.     (cat "\nIf this is an update, please, do *NOT* install TPP\n"
  28.          "over the old version, because the\n"
  29.          "directory-hierarchy has changed and in order to\n"
  30.          "guarantee a smooth transition to the new version.\n"
  31.     )
  32. )
  33.  
  34. (set #ask-destination
  35.     (cat "Enter the name of the destination-directory!"
  36.     )
  37. )
  38.  
  39. (set #ask-destination-msg
  40.     (cat "\nEnter the name of the directory, you wish to\n"
  41.          "install TPP to. A directory called TPP will\n"
  42.          "automatically be created in this directory\n"
  43.          "All other files will be stored in the directory TPP.\n\n"
  44.          "This is why you do not have to create a directory\n"
  45.          "on your own.\n"
  46.     )
  47. )
  48.  
  49. (set #which-language
  50.     (cat "Which languages (incl. documentation) are to\n"
  51.          "be installed?\n"
  52.     )
  53. )
  54.  
  55. (set #no-tex "No TeX")
  56.  
  57. (set #which-tex
  58.     (cat "Which implementation of TeX do you intend\n"
  59.          "to use in combination with TPP?\n"
  60.     )
  61. )
  62.  
  63. (set #ask-bigtex
  64.     (cat "Which variant of the TeX compiler do you use?"
  65.     )
  66. )
  67.  
  68. (set #ask-latex
  69.     (cat "TPP needs LaTeX of March 25th, 1992.\n"
  70.          "Do you want to install the LaTeX-files,\n"
  71.          "needed by TPP for working correctly?\n"
  72.          "Before the installation, you will be\n"
  73.          "asked for a destination directory."
  74.     )
  75. )
  76. (set #answer-yes "Yes")
  77. (set #answer-no "No")
  78.  
  79. (set #ask-tppstyles
  80.     (cat "Do you want to install the TPP-style-\n"
  81.          "files, which TPP needs to work cor-\n"
  82.          "rectly?.\n"
  83.          "Before the installation, you will be\n"
  84.          "asked for a destination directory."
  85.     )
  86. )
  87.  
  88. (set #ask-germanstyle
  89.     (cat "Do you want to install the style file\n"
  90.          "german.sty 2.4a, which TPP needs to work\n"
  91.          "correctly (with languages different from\n"
  92.          "German, too)?\n"
  93.          "Before the installation, you will be\n"
  94.          "asked for a destination directory."
  95.     )
  96. )
  97.  
  98. (set #install-reqtools "Installing reqtools.library ...")
  99. (set #ask-reqtools "Select a place for reqtools.library!")
  100. (set #install-powerpacker "Installing powerpacker.library ...")
  101. (set #ask-powerpacker "Select a place for powerpacker.library!")
  102. (set #install-amigaguide "Installing amigaguide.library ...")
  103. (set #ask-amigaguide "Select a place for amigaguide.library!")
  104.  
  105. (set #assign-msg
  106.     (cat "An assign for TPP: has to be\n"
  107.          "appended to your S:User-Startup"
  108.     )
  109. )
  110.  
  111. ;=============================================================================
  112. ; German strings
  113.  
  114. (if (= @language "deutsch")
  115. (
  116.  
  117.     (set default_lang 2)
  118.  
  119.     (set #bad-kick "TPP läuft nur unter OS 2.04 oder besser!\n")
  120.  
  121.     (set #install-msg
  122.         (cat "\n\nTeXt Plus Professional Installationsskript.\n"
  123.              "Diese Befehlsdatei installiert TPP auf Ihrem Amiga.\n"
  124.              "Lesen Sie die Dokumentation für\n"
  125.              "weitere Informationen über TPP.\n\n"
  126.              "TeXt Plus Professional © 1988-1994 Martin Steppler\n"
  127.              "All rights reserved."
  128.         )
  129.     )
  130.  
  131.     (set #update-msg
  132.         (cat "\nFalls dies ein Update ist, installieren Sie TPP\n"
  133.              "bitte *NICHT* über die alte Version, da sich die\n"
  134.              "Verzeichnisstruktur geändert hat und um Ihnen\n"
  135.              "einen sicheren Übergang zur neuen Version zu\n"
  136.              "gewährleisten.\n"
  137.         )
  138.     )
  139.  
  140.     (set #ask-destination
  141.         (cat "Geben Sie das Zielverzeichnis an!"
  142.         )
  143.     )
  144.  
  145.     (set #ask-destination-msg
  146.         (cat "\nGeben Sie den Namen des Verzeichnisses an, wohin\n"
  147.              "TPP installiert werden soll. In diesem Verzeichnis\n"
  148.              "wird automatisch ein Verzeichnis TPP erzeugt, in dem\n"
  149.              "die weiteren Dateien abgelegt werden.\n\n"
  150.              "Sie brauchen also kein Verzeichnis selbst anlegen."
  151.         )
  152.     )
  153.  
  154.     (set #which-language
  155.         (cat "Welche Sprachen (inkl. Dokumentation) sollen\n"
  156.              "installiert werden?\n"
  157.         )
  158.     )
  159.  
  160.     (set #no-tex "Kein TeX")
  161.  
  162.     (set #which-tex
  163.         (cat "Welche Implementation von TeX werden Sie\n"
  164.              "in Zusammenarbeit mit TPP benutzen?\n"
  165.         )
  166.     )
  167.  
  168.     (set #ask-bigtex
  169.         (cat "Welche Variante des TeX-Compilers benutzen Sie?"
  170.         )
  171.     )
  172.  
  173.     (set #ask-latex
  174.         (cat "TPP benötigt LaTeX vom 25.3.92.\n"
  175.              "Sollen die für den Betrieb von TPP nötigen\n"
  176.              "LaTeX-Dateien installiert werden?\n"
  177.              "Sie werden vorher nach dem Zielverzeichnis\n"
  178.              "gefragt werden."
  179.         )
  180.     )
  181.     (set #answer-yes "Ja")
  182.     (set #answer-no "Nein")
  183.  
  184.     (set #ask-tppstyles
  185.         (cat "Sollen die TPP-Style-Dateien, die zur\n"
  186.              "Arbeit von TPP mit TeX *notwendig* sind,\n"
  187.              "installiert werden?\n"
  188.              "Sie werden vorher nach dem Zielverzeichnis\n"
  189.              "gefragt werden."
  190.         )
  191.     )
  192.  
  193.     (set #ask-germanstyle
  194.         (cat "Soll der Style german.sty 2.4a, der zur\n"
  195.              "Arbeit von TPP mit TeX *notwendig* ist\n"
  196.              "(auch bei anderen Sprachen), installiert\n"
  197.              "werden?\n"
  198.              "Sie werden vorher nach dem Zielverzeichnis\n"
  199.              "gefragt werden."
  200.         )
  201.     )
  202.  
  203.     (set #install-reqtools "Installiere reqtools.library ...")
  204.     (set #ask-reqtools "Wohin soll reqtools.library installiert werden?")
  205.     (set #install-powerpacker "Installiere powerpacker.library ...")
  206.     (set #ask-powerpacker "Wohin soll powerpacker.library installiert werden?")
  207.     (set #install-amigaguide "Installiere amigaguide.library ...")
  208.     (set #ask-amigaguide "Wohin soll amigaguide.library installiert werden?")
  209.  
  210.     (set #assign-msg
  211.         (cat "Es muß ein Assign für TPP: an Ihre\n"
  212.              "S:User-Startup angehängt werden"
  213.         )
  214.     )
  215. ))
  216.  
  217. ;=============================================================================
  218. ;=============================================================================
  219. ; make sure we are running under a 2.04 ROM
  220.  
  221. (complete 0)
  222.  
  223. (if (< (/ (getversion) 65536) 37)
  224. (
  225.     (abort #bad-kick)
  226. ))
  227.  
  228. ;=============================================================================
  229.  
  230. (message #install-msg)
  231.  
  232. (if (exists "TPP:" (noreq))
  233. (
  234.     (message #update-msg)
  235. ))
  236.  
  237. (message #ask-destination-msg)
  238.  
  239. (complete 5)
  240.  
  241. ; ask user where to install TPP to
  242. (set @default-dest
  243.     (tackon
  244.         (askdir
  245.             (prompt #ask-destination)
  246.             (help @askdir-help)
  247.             (default "Work:")
  248.         )
  249.         "TPP"
  250.     )
  251. )
  252.  
  253. (complete 10)
  254.  
  255. ; ask user which languages are to be installed
  256. (set lang
  257.     (askoptions
  258.         (prompt #which-language)
  259.         (help @askoptions-help)
  260.         (choices "english"
  261.                  "deutsch"
  262.         )
  263.         (default default_lang)
  264.     )
  265. )
  266.  
  267. (complete 15)
  268.  
  269. ; ask user which implementation of TeX he works with
  270. (set tex
  271.     (askchoice
  272.         (prompt #which-tex)
  273.         (help @askchoice-help)
  274.         (choices "PasTeX"
  275.                  "AmigaTeX"
  276.                  #no-tex
  277.         )
  278.     )
  279. )
  280.  
  281. (complete 20)
  282.  
  283. ; if he works with PasTeX, does he use BigTeX or SmallTeX?
  284. (if (= 0 tex)
  285. (
  286.     (set bigtex
  287.         (askchoice
  288.             (prompt #ask-bigtex)
  289.             (help @askchoice-help)
  290.             (choices "SmallTeX"
  291.                      "BigTeX"
  292.             )
  293.         )
  294.     )
  295. ))
  296.  
  297.  
  298. ;-----------------------------------------------------------------------------
  299. ; copy all language non-specific files
  300.  
  301. (copyfiles
  302.     (source "/")
  303.     (dest @default-dest)
  304.     (pattern "(TPP|Text|Hist|Parse|Rexx|Mailmerge|IFF)#?")
  305.     (infos)
  306. )
  307.  
  308. ; make several dirs
  309. (makedir (cat @default-dest "/Config"))
  310. (makedir (cat @default-dest "/Doc"))
  311. (makedir (cat @default-dest "/Example"))
  312. (makedir (cat @default-dest "/Help"))
  313.  
  314. ; copy their icons
  315. (copyfiles
  316.     (source "/")
  317.     (dest @default-dest)
  318.     (pattern "(Config|Doc|Example|Help).info")
  319. )
  320.  
  321. ; copy tpp default icon
  322. (copyfiles
  323.     (source "/Config/def_tpp.info")
  324.     (dest
  325.         (cat @default-dest "/Config")
  326.     )
  327. )
  328.  
  329. ; no catalogs, if only "deutsch" was specified
  330. (if (<> 2 lang)
  331. (
  332.     (makedir (cat @default-dest "/Catalogs"))
  333. ))
  334.  
  335. (complete 50)
  336.  
  337. ; copy all language specific files
  338. (set n 0)
  339. (while
  340.     (set language
  341.         (select n "english"
  342.                   "deutsch"
  343.                   ""
  344.         )
  345.     )
  346. (
  347.     (if (IN lang n)
  348.     (
  349.         (set k 0)
  350.         (while
  351.             (set dir
  352.                 (select k "/Config/"
  353.                           "/Doc/"
  354.                           "/Example/"
  355.                           "/Help/"
  356.                           ""
  357.                 )
  358.             )
  359.         (
  360.             (copyfiles
  361.                 (source
  362.                     (cat dir language)
  363.                 )
  364.                 (dest
  365.                     (cat @default-dest dir language)
  366.                 )
  367.                 (infos)
  368.                 (all)
  369.             )
  370.             (set k (+ k 1))
  371.         ))
  372.  
  373.         ; copy Catalog files
  374.         (if (<> 1 n)
  375.         (
  376.             (copyfiles
  377.                 (source
  378.                     (cat "/Catalogs/" language)
  379.                 )
  380.                 (dest
  381.                     (cat @default-dest "/Catalogs/" language)
  382.                 )
  383.                 (all)
  384.             )
  385.         ))
  386.  
  387.         ; copy readme file
  388.         (copyfiles
  389.             (source
  390.                 (select n "/ReadMe"
  391.                           "/LiesMich"
  392.                 )
  393.             )
  394.             (dest @default-dest)
  395.             (infos)
  396.         )
  397.  
  398.         ; install config file according to user's
  399.         ; previously made choices
  400.         (copyfiles
  401.             (source
  402.                 (select tex
  403.                     (select bigtex
  404.                         (cat "/Config/" language "/TPP_PasTeX_SmallTeX.Config")
  405.                         (cat "/Config/" language "/TPP_PasTeX_BigTeX.Config")
  406.                     )
  407.                     (cat "/Config/" language "/TPP_AmigaTeX.Config")
  408.                     (cat "/Config/" language "/TPP_PRT.Config")
  409.                 )
  410.             )
  411.             (dest
  412.                 (cat @default-dest "/Config/" language)
  413.             )
  414.             (newname "TPP.Config")
  415.         )
  416.     ))
  417.     (set n (+ n 1))
  418. ))
  419.  
  420. (complete 80)
  421.  
  422. ; copy TeX related files
  423. (if (<> 2 tex)
  424. (
  425.     (copyfiles
  426.         (source "/")
  427.         (dest @default-dest)
  428.         (infos)
  429.         (pattern "(Bin|TeX)")
  430.     )
  431.  
  432.     (if (askbool
  433.             (prompt #ask-latex)
  434.             (help @askbool-help)
  435.             (default 1)
  436.             (choices #answer-yes #answer-no)
  437.         )
  438.     (
  439.         ; ask user where to install LaTeX style files
  440.         (set latex_dir
  441.             (askdir
  442.                 (prompt #ask-destination)
  443.                 (help @askdir-help)
  444.                 (default
  445.                     (select tex "TeX:macros/latex"
  446.                                 "TeX:inputs"
  447.                     )
  448.                 )
  449.             )
  450.         )
  451.  
  452.         ; install LaTeX files
  453.         (copyfiles
  454.             (source "/TeX/latex")
  455.             (dest latex_dir)
  456.             (all)
  457.         )
  458.  
  459.     ))
  460.  
  461.     (if (askbool
  462.             (prompt #ask-tppstyles)
  463.             (help @askbool-help)
  464.             (default 1)
  465.             (choices #answer-yes #answer-no)
  466.         )
  467.     (
  468.         ; ask user where to install TPP style files
  469.         (set tppstyles_dir
  470.             (askdir
  471.                 (prompt #ask-destination)
  472.                 (help @askdir-help)
  473.                 (default
  474.                     (select tex "TeX:macros"
  475.                                 "TeX:inputs"
  476.                     )
  477.                 )
  478.             )
  479.         )
  480.  
  481.         ; install tppstyles files
  482.         (copyfiles
  483.             (source "/TeX")
  484.             (dest tppstyles_dir)
  485.             (pattern "tpp#?.(sty|tex)")
  486.         )
  487.     ))
  488.  
  489.     (if (askbool
  490.             (prompt #ask-germanstyle)
  491.             (help @askbool-help)
  492.             (default 1)
  493.             (choices #answer-yes #answer-no)
  494.         )
  495.     (
  496.         ; ask user where to install german style file
  497.         (set germanstyle_dir
  498.             (askdir
  499.                 (prompt #ask-destination)
  500.                 (help @askdir-help)
  501.                 (default
  502.                     (select tex "TeX:macros"
  503.                                 "TeX:inputs"
  504.                     )
  505.                 )
  506.             )
  507.         )
  508.  
  509.         ; install germanstyle file
  510.         (copyfiles
  511.             (source "/TeX/german.sty")
  512.             (dest germanstyle_dir)
  513.         )
  514.     ))
  515. ))
  516.  
  517. (complete 90)
  518.  
  519. ; install reqtools.library
  520. ;         powerpacker.library
  521. ;         amigaguide.library
  522.  
  523. (copylib
  524.     (prompt #install-reqtools)
  525.     (help @copylib-help)
  526.     (confirm)
  527.     (source "/Libs/reqtools.library")
  528.     (dest
  529.         (askdir
  530.                 (prompt #ask-reqtools)
  531.                 (help @askdir-help)
  532.                 (default "LIBS:")
  533.         )
  534.     )
  535. )
  536.  
  537. (copylib
  538.     (prompt #install-powerpacker)
  539.     (help @copylib-help)
  540.     (confirm)
  541.     (source "/Libs/powerpacker.library")
  542.     (dest
  543.         (askdir
  544.                 (prompt #ask-powerpacker)
  545.                 (help @askdir-help)
  546.                 (default "LIBS:")
  547.         )
  548.     )
  549. )
  550.  
  551. (copylib
  552.     (prompt #install-amigaguide)
  553.     (help @copylib-help)
  554.     (confirm)
  555.     (source "/Libs/amigaguide.library")
  556.     (dest
  557.         (askdir
  558.                 (prompt #ask-amigaguide)
  559.                 (help @askdir-help)
  560.                 (default "LIBS:")
  561.         )
  562.     )
  563. )
  564.  
  565. (complete 95)
  566.  
  567. ; add assign to s:user-startup
  568. (startup "TeXtPlusProfessional"
  569.     (prompt #assign-msg)
  570.     (help @startup-help)
  571.     (command (cat "Assign >NIL: TPP: " @default-dest))
  572. )
  573.  
  574. ; and make assign
  575. (makeassign "TPP" @default-dest)
  576.  
  577. ; so long and thanks for all the fish
  578. (complete 100)
  579.